package beans;

import entities.Volo;
import controllers.VoloFacade;
import java.io.Serializable;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.inject.Named;
import javax.inject.Inject;
import javax.faces.view.ViewScoped;
import javax.faces.view.facelets.FaceletContext;

@Named(value = "voloController")
@ViewScoped
public class VoloController extends AbstractController<Volo> implements Serializable {


    @Inject
    private VoloFacade ejbFacade;

    public VoloController() {
        super(Volo.class);
    }

    @PostConstruct
    public void init() {
        super.setFacade(ejbFacade);
    }

    @Override
     public void saveNew(ActionEvent event) {
        super.selected.setIdVOLO(super.selected.getElemento().getIdELEMENTO());
        super.saveNew(event);
    }
}
